package com.ziroom.client;

public class MainClient {

	public static void main(String[] args){
		try{
			
			RoomData room1 = new RoomData();
			room1.setHouseCode("001");
			room1.setNoiseEffect("GOOD");
			room1.setPayWay("000001");
			room1.setRentFee(new Long(2000));
			room1.setRentStatus("dzz");
			room1.setRoomArea(new Float(200.00));
			room1.setRoomCode("001-01");
			room1.setRoomComment("aaafdfasdf");
			room1.setRoomHeight("10");
			room1.setRoomLength("20");
			room1.setRoomName("这是一间房");
			room1.setRoomPosition("00001");
			room1.setRoomStatus("dzz");
			room1.setRoomType("ROOM_X_X");
			room1.setSysHouseId(new Integer(123));
			room1.setSysRoomId(new Integer(12345));
			
			RoomData room2 = new RoomData();
			room1.setHouseCode("001");
			room1.setNoiseEffect("GOOD");
			room1.setPayWay("000001");
			room1.setRentFee(new Long(3000));
			room1.setRentStatus("dzz");
			room1.setRoomArea(new Float(200.00));
			room1.setRoomCode("001-02");
			room1.setRoomComment("aaafdfasdf");
			room1.setRoomHeight("10");
			room1.setRoomLength("20");
			room1.setRoomName("这是一间房");
			room1.setRoomPosition("00001");
			room1.setRoomStatus("dzz");
			room1.setRoomType("ROOM_X_X");
			room1.setSysHouseId(new Integer(123));
			room1.setSysRoomId(new Integer(12346));
			
			RoomData[] rooms = new RoomData[2];
			rooms[0] = room1;
			rooms[1] = room2;
			HouseData house = new HouseData();
			house.setRoomData(rooms);
			house.setAgentName("daffds");
			house.setAgentPhone("233243243");
			house.setAssistantCode(new Integer(3423423));
			house.setBroadband("sdfasd");
			house.setBuilding("sdfads");
			house.setBuscode("dfasd");
			house.setCharacteristics("adfasdfads");
			house.setCity("dsfadsf");
			house.setCounties("adfasf");
			house.setCustomerPay("sdfasd");
			house.setCycle("dfasdfads");
			house.setCycleFace("dasadfa");
			house.setHouseCode("001");
			house.setHouseStatus("dzz");
			house.setRentStatus("dzz");
			
			CustomerData customer = new CustomerData();
			customer.setSysCustId(new Integer(200015));
			customer.setCustName("李际顺");
			customer.setCustCode("9000028");
			customer.setPhone("13051012679");
			customer.setSex("1");
			customer.setCertificateType("身份证");
			customer.setCertNum("110108194808176333");
			customer.setNationality("中国");
			customer.setNational("汉");
			
			ContractData contract = new ContractData();
			contract.setHouseData(house);
			contract.setCustomerData(customer);
			contract.setContractCode("adfasd");
			contract.setCustCode("sadfasdfa");
			contract.setHouseCode("001");
			ZiruContractInterfaceServiceLocator locator = new ZiruContractInterfaceServiceLocator();
			ZiruService service = locator.getziruServicePort();
			String str = service.reciveContract(contract);
			
			System.out.println(str);
		}catch(Throwable t){
			t.printStackTrace();
		}
	}
}
